package imserver.service;

import javax.servlet.http.HttpServletRequest;

import imserver.beans.MemberInfo;
import imserver.common.util.DaoException;
import imserver.dao.BaseDao;

public interface MemberService extends BaseDao<MemberInfo>{
	
	/**
	 * 用户注册
	 * @param memberInfo
	 * @throws DaoException 
	 */
	public void register(MemberInfo memberInfo) throws DaoException;
	
	/**
	 * 用户登录
	 * @param user
	 * @param pass
	 * @return
	 * @throws DaoException 
	 */
	public int login(String user, String pass, HttpServletRequest request) throws DaoException;
	
	/**
	 * 判断账户是否已经存在了
	 * @param memberNum
	 * @return
	 * @throws DaoException 
	 */
	public boolean exists(String memberNum) throws DaoException;
	
	/**
	 * 修改用户在线状态
	 * @param status
	 * @throws DaoException 
	 */
	public void updateStatus(int status, String memberInfo) throws DaoException;
	
	/**
	 * 通过账户获取用户
	 * @throws DaoException 
	 */
	public MemberInfo getMember(String memberNum) throws DaoException;
	
}
